import 'package:flutter/material.dart';

import 'coupon/coupon_item.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class CouponPage extends StatefulWidget {
  @override
  _CouponPageState createState() => _CouponPageState();
}

class _CouponPageState extends State<CouponPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('我的优惠券',
          style: TextStyle(
              fontSize: 30.sp,
              fontWeight: FontWeight.bold),),
        centerTitle: true,
      ),
      body: Container(
        width: 700.w,
        margin: EdgeInsets.only(left: 25.w),
        child: ListView.builder(
          itemBuilder: (context, int index) {
            return Container(
              height: 150.w,
              child: Column(
                children: [
                  index.isOdd?ColorFiltered(
                    colorFilter:
                        ColorFilter.mode(Colors.grey[200], BlendMode.color),
                    child: CouponItem(),
                  ):CouponItem(),
                  SizedBox(
                    height: 30.w,
                  )
                ],
              ),
            );
          },
          itemCount: 10,
        ),
      ),
    );
  }
}
